package com.zjitc;

import java.sql.Connection;
import java.sql.SQLException;
import javafx.application.Application;
import javax.sql.DataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
      ApplicationContext context=new AnnotationConfigApplicationContext(DataSourceConfiguration.class);
      DataSource dataSource = context.getBean(DataSource.class);
      try {
        Connection connection=dataSource.getConnection();
        System.out.println(connection);
      } catch (SQLException e) {
        e.printStackTrace();
      }
    }
}
